<div class="col-md-3 <?php
if ($good['is_stock']) {
    echo 'goods_item_no_stock';
}
?>">
    <div class="thumbnail" id="<?php echo $good['goods_id']; ?>" >
        <?php
		//是否售完
		if($good['is_stock']){
		?>
        <img class="lazy good_img" src="/images/1zw.gif" data-original="<?php echo $good['product_img']; ?>" alt="<?php echo $good['goods_name']; ?>"  title="<?php echo $good['goods_name']; ?>">
        <?php
		}else{
		?>
        <a href="<?php echo Yii::app()->request->hostInfo.Yii::app()->createUrl('/front/good/show', array('gid' => $good['goods_id'])); ?>" target="_blank" class="good_url" title="<?php echo $good['goods_name']; ?>">
            <img class="lazy good_img" src="/images/1zw.gif" data-original="<?php echo $good['product_img']; ?>" alt="<?php echo $good['goods_name']; ?>"  title="<?php echo $good['goods_name']; ?>">
        </a>
        <?php
		}
		?>
        <div class="caption">
            <div class="item-title">
                <span ><?php echo $good['goods_name']; ?></span>
            </div>
            <div class="information">
            	<div class="pull-left info_top">
            		<span class="price_red">&#165</span>
            		<span class="promo_price"><?php echo $good['promo_price']; ?></span>
            	</div>
            	<div class="pull-left info_top">
					<div class="pull-left zhekou"><?php echo number_format($good['promo_price'] / $good['p_price'] * 10, 1);?> 折</div>
					<div class="pull-left sales">
	            		<?php
						if ($good['is_stock']) :
						    echo $good['sales_str'];
						else:
							echo "已售:<span>".mb_substr($good['sales_str'], 2, strlen($good['sales_str']),'utf-8')." </span>";
						endif;
						?>
	            	</div>
            	</div>
            	<a  class="pull-right buy_btn" href="<?php echo Yii::app()->request->hostInfo.Yii::app()->createUrl('/front/good/show', array('gid' => $good['goods_id'])); ?>" target="_blank" class="good_url" title="<?php echo $good['goods_name']; ?>">
	            	<div>
	            		我要购买
	            	</div>
	            </a>
            	<div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
    
    <?php 
    	$time = $_SERVER["REQUEST_TIME"];
    	$timer = $good['end_time'] - $time;
    	$d = floor($timer / 86400);
    	if ($d > 0 && $d == 2) {
			echo '<div class="today_new"></div>';
		}
    ?>
    	
    <?php
	//是否售完
	if($good['is_stock']){
	?>
    <a class="no_stock_icon" title="<?php echo $good['goods_name']; ?>"></a>
    <?php
	}else{
	?>
    <a class="no_stock_icon" href="<?php echo Yii::app()->request->hostInfo.Yii::app()->createUrl('/front/good/show', array('gid' => $good['goods_id'])); ?>" target="_blank"  title="<?php echo $good['goods_name']; ?>"></a>
    <?php
	}
	?>
</div>